import { Routes } from '@angular/router';

export const HomeComponent_ROUTES: Routes = [
  //{ path: '', loadChildren: () => WelcomeComponent },
  { path: '', redirectTo: 'welcome', pathMatch: 'full' }, // redirect to `first-component`
  // { path: '', component: HomeComponent },

  // 路由懒加载的写法 import('../welcome/welcome.routes').then(m => m.WelcomeComponent_ROUTES)
  {
    path: 'welcome',
    loadChildren: () =>
      import('../welcome/welcome.routes').then((m) => m.WELCOME_ROUTES),
  },

  {
    path: 'login',
    loadChildren: () =>
      import('../login/login.routes').then((m) => m.LoginComponent_ROUTES),
  },

  // 路由直接加载子路由写法 { path: 'welcome', loadChildren: () => WelcomeComponent_ROUTES },

  {
    path: '**',
    loadChildren: () =>
      import('../page-not-found/page-not-found.routes').then((m) => m.PageNotFoundComponent_ROUTES),
  }, // 通配符路由排在最后， 404
];
